package no.group.gowther.service;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.nio.file.Path;
import java.nio.file.Paths;

@Component
public class OnePieceConfig {
    // 归档目录
    public final String onePieceHome;
    // 限制分片目录的文件数量
    public final int sliceSize;
    public final Path onePieceHomePath;

    public OnePieceConfig(@Value("${one-piece.home}") String onePieceHome, @Value("${one-piece.slice-size}") int sliceSize) {
        this.onePieceHome = onePieceHome;
        this.onePieceHomePath = Paths.get(onePieceHome);
        this.sliceSize = sliceSize;
    }
}
